<%@page contentType="text/html" pageEncoding="UTF-8"%>


<jsp:useBean id="admBean" class="struts.actions.AdminAction" scope="application"/>
<jsp:useBean id="userBean" class="struts.actions.UserAction" scope="session"/>
<jsp:setProperty name="userBean" property="adminAction" value="<%= admBean %>"/>
<jsp:setProperty name="userBean" property="*"/>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <title>SMRI Searcher</title>
    <link rel="canonical" href="http://www.shinysearch.com" />
    <link href="css/home.css" rel="stylesheet" type="text/css">
    <link href="../css/home.css" rel="stylesheet" type="text/css">

    <style type="text/css">
        <!--
        body { background-color: #76AFCA; }
        #AutoNumber1 { text-align: center; width: 50%; height: 50%; background-color: #76AFCA; border: 0px solid; }
        #AutoNumber1 { margin-left: auto; margin-right: auto; }
        #left_td { width: 0px; font-size: 0px; line-height: 0px; margin: 0px; padding: 0px; }
        #container_td { vertical-align: top; }
        #top_td { height: 10%; }
        #bottom_td { height: 90%; }
        .q, a.q:active, a.q:link, a.q:hover, a.q:visited  { color :#292421; }
        -->
    </style>
    <script>
        var current_menu = false;
        function show_menu(menu_name, link) {
            var new_menu = document.getElementById("menu_" + menu_name);
            //if (new_menu != current_menu) {
		if (current_menu) {
			current_menu.style.display = "none";
		}
		new_menu.style.display = "block";
		current_menu = new_menu;
            //}
        }
        function hide_menu(menu_name, link) {
            var new_menu = document.getElementById("menu_" + menu_name);
            if (new_menu == current_menu) {
		current_menu.style.display = "none";
		if (current_submenu) {
			current_submenu.style.display = "none";
		}
		current_menu = false;
		current_submenu = false;
            }
        }
    </script>
</head>
<body>

    <%
        //Si se ha ralizado un busqueda, redirigimos a la web donde se muestran los resultados
        if(request.getParameter("searchText") != null)
        {
            if(!userBean.isEmpty())
            {
                userBean.search();
                response.sendRedirect("resultsearch.jsp");
            }            
        }
      %>
        <div id="overlay" align="center" valign="middle">&#160;</div>
        <div id="getmenu_container">
            <div id="menubar">
                <ul class="menubar">
                    <li onmouseover="show_menu('check_email');" onmouseout="hide_menu('check_email');">
                            <div><a href="#" class="root" onclick="return false;">Desarrollado por▼</a></div>
                            <div class="popup_menu" id="menu_check_email">
                                <div><a href="">Eduardo Moreno</a></div>
                                <div><a href="">Jos&eacute; Mar&iacute;a Romero</a></div>
                                <div><a href="">Manuel Jes&uacute;s Iglesias</a></div>
                            </div>
                    </li>
                </ul>
            </div>
        </div>

        <div id="content" style="height:100%; overflow: hidden;">
            <table cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="height: 100%;">
                <tr><td id="top_td" colspan="2">&#160;</td></tr>
                <tr>
                    <td id="left_td"></td>
                    <td id="bottom_td">
                        <table cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="height: 100%">
                            <tr>
                                <td id="container_td">
                                    <table border="0" cellpadding="0" cellspacing="0" id="AutoNumber1">
                                        <tr>
                                            <td width="100%" height="304" align="center" valign="middle">
                                                <table cellpadding="0" cellspacing="0" border="0" style="z-index: 30; position: relative;">
                                                    <tr>
                                                        <td>
                                                            <p align="center">
<!--                                                                <img alt="" src="http://74.205.46.130/f/logogen.php?lstyle=peeping-eyes&amp;ltext=SMRI Searcher&amp;lsize=55&amp;lcolor=800000&amp;lbcolor=FFFFFF&amp;ladj=1&amp;lmargin=20" id="logo_img" />-->
                                                                    <img alt="" src="http://74.205.46.130/f/logogen.php?lstyle=bold-cartoon&amp;ltext=SMRI Searcher&amp;lsize=64&amp;lcolor=E6E066&amp;lbcolor=76AFCA&amp;ladj=1&amp;btran=0&amp;lmargin=20" id="logo_img">
<!--                                                                <img alt="" src="http://funnylogo.info/logo/Google/Red/SMRI%20Searcher.aspx" style="border-width:0px; background-color: #E6E066;" id="logo_img">-->
                                                            </p>
                                                            <p align="center" class="q">
                                                            <% if(userBean.isEmpty()) { %> <font color="red" style="font-weight: bold">¡¡¡ &Iacute;ndice Vacio!!!</font> <% } %>
                                                            
                                                            <form action="userWeb/index.jsp" method="post">
                                                                <table cellSpacing="0" cellPadding="0" style="margin-left: auto; margin-right: auto">
                                                                    <tr vAlign="top">
                                                                        <td width="25%" style="font-family: arial,sans-serif">&nbsp;</td>
                                                                        <td noWrap valign="middle" align="center" style="font-family: arial,sans-serif">
                                                                            <input type="text" name="searchText" size="55" autocomplete="off" /><br>
                                                                            <input type="submit" name="sa" value="Search" />
                                                                            <script type="text/javascript">
                                                                                                        write_buttons("");
                                                                                                        load_menu();
                                                                                                        </script>
                                                                        </td>
                                                                        <td noWrap width="25%" style="font-family: arial,sans-serif">
                                                                            <font size="-2">&nbsp;</font></td>
                                                                    </tr>
                                                                </table>
                                                            </form>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                    </table>

                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </div>


    </body>

</html>
